{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# python your_script.py < input.txt"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "txt\n",
    "5 1 0\n",
    "3 3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import sys\n",
    "\n",
    "# 假设你的程序是这样的\n",
    "def main():\n",
    "    lines = sys.stdin.readlines()\n",
    "    for line in lines:\n",
    "        parts = line.strip().split()\n",
    "        # 你的逻辑代码\n",
    "\n",
    "# 模拟输入\n",
    "input_data = \"\"\"5 1 0\n",
    "3 3\"\"\"\n",
    "\n",
    "# 将标准输入重定向为模拟输入\n",
    "sys.stdin = io.StringIO(input_data)\n",
    "\n",
    "# 调用 main 函数\n",
    "main()"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
